package com.service;
import java.util.List;
import com.model.Shuqian;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
import com.mapper.ShuqianMapper;
@Service
public class ShuqianServiceImpl implements ShuqianService
{
        
        @Autowired
	private ShuqianMapper shuqianMapper;


	public List<Shuqian> queryShuqianList(Shuqian shuqian) throws Exception {
		Map<String, Object> map = new HashMap<String, Object>();
		if(shuqian!=null){
			 map.put("uid", shuqian.getUid());
			 map.put("zid", shuqian.getZid());
		}
		
		List<Shuqian> getShuqian = shuqianMapper.query(map);
		return getShuqian;
	}

	public int insertShuqian(Shuqian shuqian) throws Exception {
		
		return shuqianMapper.insertShuqian(shuqian);
	}

	public int deleteShuqian(int id) throws Exception {
		return shuqianMapper.deleteShuqian(id);
	}

	public int updateShuqian(Shuqian shuqian) throws Exception {
		return shuqianMapper.updateShuqian(shuqian);
	}
	
	public Shuqian queryShuqianById(int id) throws Exception {
		return shuqianMapper.queryShuqianById(id);
	}
 
}
